package com.deelete.springcloud.service;


import com.deelete.springcloud.pojo.Storage;
import com.deelete.springcloud.utils.CommonResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 库存微服务调用接口
 */

@FeignClient(value = "ali-storage-service")
@Service
public interface StorageService {

    /**
     * 操作库存
     * @param productId 产品id
     * @param count  数量
     * @return
     */
    @PostMapping("/storage/createStorage")
    public CommonResult<Storage> createStorage(@RequestParam("productId") Long productId, @RequestParam("count") Integer count);
}
